package com.dk.assertion;

import com.dk.domain.ApiAutoTestEntity;
import com.dk.testflow.ApiAutoTestChain;

/**
 * 断言链配置
 */
public class AssertChainConfig {
    /**
     * 获取断言链对象
     * @return
     */
    public static AssertChain getAssertChain(){
        AssertChain errorCheckLink = new ErrorCheckLink();
        AssertChain nullCheckLink = new NullCheckLink();
        AssertChain equalsLink = new EqualsLink();
        AssertChain containLink = new ContainLink();
        AssertChain noContainLink = new NoContainLink();
        AssertChain jsonPathCheckLink = new JsonPathCheckLink();

        errorCheckLink.setAssertChain(nullCheckLink);
        nullCheckLink.setAssertChain(equalsLink);
        equalsLink.setAssertChain(containLink);
        containLink.setAssertChain(noContainLink);
        noContainLink.setAssertChain(jsonPathCheckLink);
        return errorCheckLink;
    }
}
